package com.lx.patterns.factory.sample_factory;


/**
 * @ClassName SampleCoffeeFactory
 * @Description: //咖啡对象创建工厂
 * @Author: 落雪
 * @CreateDate: 2025/1/14 20:10
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/1/14 20:10
 * @UpdateRemark:
 * @Version: 1.0
 */
public class SampleCoffeeFactory {

    public static Coffee createCoffee(String type){

        Coffee coffee = null;
        if("american".equals(type)){
            coffee = new AmericanCoffee();
        }else {
            coffee = new LatteCoffee();
        }

        return coffee;
    }


}
